<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditActivityTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditActivityLabel_activityname}" for="activityname" />
                    <h:inputText id="activityname" value="#{activityController.selected.activityname}" title="#{bundle.EditActivityTitle_activityname}" />
                    <h:outputLabel value="#{bundle.EditActivityLabel_startdatetime}" for="startdatetime" />
                    <h:inputText id="startdatetime" value="#{activityController.selected.startdatetime}" title="#{bundle.EditActivityTitle_startdatetime}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditActivityLabel_activitytype}" for="activitytype" />
                    <h:inputText id="activitytype" value="#{activityController.selected.activitytype}" title="#{bundle.EditActivityTitle_activitytype}" />
                    <h:outputLabel value="#{bundle.EditActivityLabel_time}" for="time" />
                    <h:inputText id="time" value="#{activityController.selected.time}" title="#{bundle.EditActivityTitle_time}" />
                    <h:outputLabel value="#{bundle.EditActivityLabel_distance}" for="distance" />
                    <h:inputText id="distance" value="#{activityController.selected.distance}" title="#{bundle.EditActivityTitle_distance}" />
                    <h:outputLabel value="#{bundle.EditActivityLabel_description}" for="description" />
                    <h:inputText id="description" value="#{activityController.selected.description}" title="#{bundle.EditActivityTitle_description}" />
                    <h:outputLabel value="#{bundle.EditActivityLabel_activityid}" for="activityid" />
                    <h:inputText id="activityid" value="#{activityController.selected.activityid}" title="#{bundle.EditActivityTitle_activityid}" required="true" requiredMessage="#{bundle.EditActivityRequiredMessage_activityid}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                </h:panelGrid>
                <h:commandLink action="#{activityController.update}" value="#{bundle.EditActivitySaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditActivityViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{activityController.prepareList}" value="#{bundle.EditActivityShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditActivityIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
        
        <ui:insert name="booty">
   
            </ui:insert>
        
    </ui:composition>

</html>
